
/*
 * object translations comes from '/web/bundles/user/js/translations/translations.js'
 */

function checkLoginForm(language)
{
    $('#login_username_error_msg').html(' ');
    $('#login_password_error_msg').html(' ');
    var err = false;
    if(isEmpty('login_username'))
    {
        err = true;
        $('#login_username_error_msg').append('<li>' + translations['messages'][language]['username_empty'] + '</li>');
    }
    
    if(isEmpty('login_password'))
    {
        err = true;
        $('#login_password_error_msg').append('<li>' + translations['messages'][language]['password_empty'] + '</li>');
    }
    
    if(!err)
        $('#loginForm').submit();
}
